home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
0022-3.564
/
dmg-3451
/
data
/
starfild.dat
< prev
next >
Wrap
Text File
|
1987-04-21
|
4KB
|
106 lines
STOS STARFIELD DESIGNER
~~~~~~~~~~~~~~~~~~~~~~~
BY
WILLIAM BRYAN
"God, I wish I could work out the waves for those bloody
starfields everybody is doing these days!", said Eddie, or at
least something with the same meaning, to Will, mathematical
problem solver extraordinaire.
"Well, I'm sure I'll be able to fit you in sometime this year
(being 1991)..........NURSE.....CAN YOU SEND THE NEXT PATIENT IN
PLEASE?"
Well, it was November, that's right the month before
December and the one after October, or is it August, or may be
July, sod it, I can't remember, when I finally started.
The routine works basically like this, define vanishing point (In
low res 160,100) where all stars will zoom out from at a radius
set from this point. A number of arrays are set up to hold X and
Y positions for each star for each frame.
Using the SIN and COSINE functions available in stos the X and Y
positions can be worked out for each star in each frame by
increasing the radius GEOMETRICALLY (Multiplying by say 1.25) or
ARITHMETICALLY (Adding 2) each time. This process creates the feel
of the stars zooming past.
Well you now how it's supposed to work, but forget about that,
this is how it really works, for all you LAMERS out their, not
mentioning any names, JOHN GREEN.
At line 48 and 49 in the programme (Ooh arr, misses) a large
number of varibubbles (As I like to call them) are set to
different values, these of cause have drastic effects on the out
come of the starfield.
YMX - The maximum value of Y for a star, once beyond this
point the star is ignored and isn't shown or stored
YMN - The minimum value of Y - See above
XMX - The maximum value of X - See YMX
XMN - The minimum value of X - See above
HOW TO MAKE YOUR STARS LOOK GOOD (Part I)
AIN# - ANGLE INCREASE VALUE (per frame) By setting this
different to 0 you can create spiraling starfields, at
least as good as the starfield on OOH CRIKEY WHAT A SCORCHER
AF# - Acceleration factor/increase. If prop is set to 1
then the radius of the stars from the origin is multiplied by
this figure, else AF# is added to the radius
PROP - See above
NS - Number of stars - USES UP MEMORY VERY QUICKLY WHEN
INCREASED
NF - Number of frames - USES UP MEMORY VERY QUICKLY WHEN
INCREASED
MNR - Minimum radius value - for first frame of every star
MXR - Maximum radius value - see above
MNA - Minimum angle - used for creating semi-circular and
other sized/shaped starfields
MXA - Maximum angle - see above
DCP# - Depth Cued Percentage - set to 0.5 for grey stars
first half of frames and second half white stars, can be changed
to create better effects
SX - Is automatically set to centre of starfield area -
should be changed to make optimum use of semi-circular
starfields, etc
SY - Y centre - see above
Well the programme.....
lines 55-100 create star flight paths
lines 110-240 rearrange stars so they don't all start at
same point and it chooses depth cued stars
lines 20000+ VECTCON.BAS built in to save a hell of a lot of
memory
lines 1000-1230 DOT DISPLAY ROUTINE - Built in for easy use,
uses machine code routine in bank 9 to plot stars
Well I hope you have more fun with my Starfield designer that I
had writing this article for STOS BITS 2, HP SOURCE what ever you
want to call it.